package smjdev012;

import java.lang.*;

public class RUNConsole extends Thread
{
	public ProcessBuilder RunPB;
	public Process RunProcess;
	
	public long RunID;
	
	public char Start_Time[];
	public char End_Time[];
	public long Duration;
	//public RUNOutput runoutput;
	//public CMD cmd;
	public String tcp;
	

	public RUNConsole(String vtcp){
		if (vtcp == "")
		{
			tcp = "cmd";
		}
		else
		{
			tcp = vtcp;
		}
		//Generate ProcessBuilder object		
		RunPB = new ProcessBuilder(this.tcp);
		// Set pwd, environment variables and other parameters

	}	

	public void run() {
		//Generate the Process
		try
		{
		RunProcess = RunPB.start();
		}
		catch(Exception e)
		{
			System.out.println("Fatal Error");
			//exit;
		}
		//Link the stream objects for STDOUT and STDERR
		//RunProcess.getErrorStream();
		//RunProcess.getInputStream();
		//Link the stream objects for STDIN
		//RunProcess.getOutputStream();

	}

	public void execute(String vcmd){
		//Dummy Comment
	}
	

}